<#include "/macro.include"/> 
<#include "/custom.include"/> 
<#assign className = table.className>
<#assign classNameLower = className?lower_case>
var init${className}SearchPage = function(){

};

var get${className}SearchParams = function(){
	var ${classNameLower}Bean = {};
	var temp;
	<#list table.columns as column>
	<#if !column.htmlHidden>
	<#if column.isDateTimeColumn>
	temp = jQuery('#${column.columnNameLower}Begin').val();
	if(temp){
		${classNameLower}Bean.${column.columnNameLower}Begin =  new Date(Date.parse((temp+":00").replace(/-/g,   "/")));
	}
	temp = jQuery('#${column.columnNameLower}End').val();
	if(temp){
		${classNameLower}Bean.${column.columnNameLower}End =  new Date(Date.parse((temp+":00").replace(/-/g,   "/")));
	}
	<#else>
	temp = jQuery('#${column.columnNameLower}Searcher').val();
	if(temp){
		${classNameLower}Bean.${column.columnNameLower} = temp;
	}
	</#if>
	</#if>
	</#list>
	return ${classNameLower}Bean;
}

jQuery(function(){
	init${className}SearchPage();
	jQuery('#search${className}').click(function(){
		${classNameLower}Manager.loadServerData(get${className}SearchParams());
	});
});


